<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>163-P215-作业-3</title>
    <style>
        * {
            margin: 0;
            border: 0;
            box-sizing: border-box;
        }

        a {
            display: block;
            width: 100px;
            height: 30px;
            line-height: 30px;
            text-decoration: none;
            color: #000;
            border: pink solid 1px;
            text-align: center;
        }

        a:hover {
            color: #f8aa57;
        }
    </style>
</head>

<body>
    <!-- 3.新浪下来菜单（微博即可） -->
    <div>
        <a href="#" id="v">微博 v</a>
        <span style="display:none;">
            <a href="#" id="a1">私信</a>
            <a href="#" id="a2">评论</a>
            <a href="#" id="a3">@我</a>
        </span>
    </div>
    <script>
        var ah = document.getElementById("v");
        var spn = document.querySelector('span');
        ah.onmouseover = function () {
            spn.style.display = 'block';
        }
        ah.onmouseout = function () {
            spn.style.display = 'none';
        }
    </script>
</body>

</html>